Conversation
Member
lightsing
commented
Dec 4, 2025
- make submodules group scroll public inputs
- expose public inputs api, refactor pi hash api using default trait implementation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures the public inputs API to improve customization by organizing Scroll-specific public input types under a scroll submodule and exposing a cleaner API surface. The refactoring separates the encoding of public inputs from their hashing, using default trait implementations for the hash functions.
Key Changes:
- Moved Scroll-specific public input types (
batch,bundle,chunk) into a newpublic_inputs::scrollsubmodule - Renamed methods from
pi_hash_*topi_*to return raw encoded bytes instead of hashes, with hash computation moved to default trait implementations - Updated all import paths throughout the codebase to reference the new
public_inputs::scroll::*locations
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/types/base/src/public_inputs/scroll.rs | New module file exposing batch, bundle, and chunk submodules |
| crates/types/base/src/public_inputs.rs | Added pi() method to traits with default pi_hash() implementations using keccak256 |
| crates/types/base/src/public_inputs/scroll/chunk.rs | Refactored methods to return Vec<u8> instead of B256, changed cloned() to copied() |
| crates/types/base/src/public_inputs/scroll/bundle.rs | Refactored methods to return Vec<u8>, removed redundant pi_hash_euclidv2() method |
| crates/types/base/src/public_inputs/scroll/batch.rs | Refactored methods to return Vec<u8> instead of B256 |
| crates/types/src/lib.rs | Updated imports to use public_inputs::scroll::* paths |
| crates/types/chunk/src/scroll/*.rs | Updated imports to reference new module structure |
| crates/types/bundle/src/witness.rs | Updated imports to reference new module structure |
| crates/types/batch/src/*.rs | Updated imports throughout batch types to reference new module structure |
| crates/circuits/*/src/circuit.rs | Updated imports in circuit files to reference new module structure |
| crates/integration/tests/bundle_circuit.rs | Updated test to use PublicInputs trait and tuple-based API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
running e2e making sure it's ok |
lispc
approved these changes
Jan 13, 2026
# Conflicts: # crates/integration/src/testers/batch.rs # crates/integration/src/testers/bundle.rs # crates/integration/src/testers/chunk.rs # crates/types/batch/src/witness.rs # crates/types/bundle/src/witness.rs
Member
Author
|
running e2e making sure it's ok |
Member
Author
|
test e2e ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 4189.60s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.